package com.bite.demo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

@RestController
public class ReadYml {
    @Value("${server.port}")
    private Integer port;


    @Autowired
    private ListConfig listConfig;

    @RequestMapping("/readList")
    public String readList(){
        return listConfig.toString();
    }
    @Autowired
    private MapConfig mapConfig;
    @RequestMapping("/readMap")
    public String readMap(){
        return mapConfig.toString();
    }

    @RequestMapping("/port1")
    public String port(){
        return "读到值"+port;
    }
}
